﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="TimesheetReportDoc.aspx.cs" Inherits="Presentation.Reporting.TimeSheetReporting" %>
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager runat="server" ID="scriptmanager">
    </asp:ScriptManager>
    <table border="0" cellpadding="0" cellspacing="0" id="content-table" width="100%">
    <tr>
        <th rowspan="3" class="sized">
            <img src="/Content/images/shared/side_shadowleft.jpg" width="20" height="300" alt="" />
        </th>
        <th class="topleft">
        </th>
        <td id="tbl-border-top">
        </td>
        <th class="topright">
        </th>
        <th rowspan="3" class="sized">
            <img src="/Content/images/shared/side_shadowright.jpg" width="20" height="300" alt="" />
        </th>
    </tr>
    <tr>
        <td id="tbl-border-left">
        </td>
        <td>
            <!--  start content-table-inner -->
            <div id="content-table-inner">
                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tr valign="top">
                        <td>
                            <!-- start id-form -->
                            <table width="100%" cellspacing="0" cellpadding="0" border="0" id="id-form">
                                <tr>
                                    <td colspan="4">
                                        <div class="legend-text">
                                            Information
                                        </div>
                                        <div class="hrStyle">
                                            <hr />
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <th style="width: 10%">
                                        Username:&nbsp
                                    </th>
                                    <td style="width: 40%">
                                        <asp:TextBox ID="UsernameTextBox" CssClass="inp-form" runat="server" TabIndex="1"></asp:TextBox>
                                                                   <asp:RequiredFieldValidator ID="UsernameRequiredFieldValidator"  Display="Dynamic"
                                                runat="server" ControlToValidate="UsernameTextBox" CssClass="validation-msg" 
                                                ErrorMessage="Username is not empty !" ForeColor="Red"></asp:RequiredFieldValidator>
                                    </td>
                                    <th style="width: 10%">
                                        Status:&nbsp
                                    </th>
                                    <td style="width: 40%">
                                        <asp:DropDownList runat="server" ID="StatusDropList" CssClass="styledselect_form_1">
                                            <asp:ListItem Value="1" Text="Approved"></asp:ListItem>
                                            <asp:ListItem Value="2" Text="Pending"></asp:ListItem>
                                            <asp:ListItem Value="3" Text="Rejected"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <th>
                                        From date:&nbsp
                                    </th>
                                    <td>
                                        <asp:TextBox  ID="FromDateTextBox" CssClass="inp-datetime" runat="server" TabIndex="3" title="(MM/dd/yyyy)"></asp:TextBox>
                                         <asp:RequiredFieldValidator ID="FromDateRequiredFieldValidator"  Display="Dynamic"
                                                runat="server" ControlToValidate="FromDateTextBox" CssClass="validation-msg" 
                                                ErrorMessage="From date is not empty !" ForeColor="Red"></asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator ID="FromDateRegularExpressionValidator" runat="server" 
                                                ErrorMessage="Start date is invaid !" ForeColor="Red" ControlToValidate="FromDateTextBox"  Display="Dynamic"
                                                ValidationExpression="^(((0?[1-9]|1[012])/(0?[1-9]|1\d|2[0-8])|(0?[13456789]|1[012])/(29|30)|(0?[13578]|1[02])/31)/(19|[2-9]\d)\d{2}|0?2/29/((19|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(([2468][048]|[3579][26])00)))$" 
                                                CssClass="validation-msg"></asp:RegularExpressionValidator>
                                    </td>
                                    <th>
                                        To date:&nbsp
                                    </th>
                                    <td>
                                        <asp:TextBox  ID="ToDateTextBox" CssClass="inp-datetime" runat="server" 
                                                TabIndex="4" title="(MM/dd/yyyy)"></asp:TextBox>
                                         <asp:RequiredFieldValidator ID="ToDateRequiredFieldValidator"  Display="Dynamic"
                                                runat="server" ControlToValidate="ToDateTextBox" CssClass="validation-msg" 
                                                ErrorMessage="To date is not empty !" ForeColor="Red"></asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator ID="TodateRegularExpressionValidator" runat="server" 
                                                ErrorMessage="Start date is invaid !" ForeColor="Red" ControlToValidate="ToDateTextBox"  Display="Dynamic"
                                                ValidationExpression="^(((0?[1-9]|1[012])/(0?[1-9]|1\d|2[0-8])|(0?[13456789]|1[012])/(29|30)|(0?[13578]|1[02])/31)/(19|[2-9]\d)\d{2}|0?2/29/((19|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(([2468][048]|[3579][26])00)))$" 
                                                CssClass="validation-msg"></asp:RegularExpressionValidator>
                                            <asp:CompareValidator ID="DateCompareValidator" runat="server" Display="Dynamic"
                                                ControlToCompare="FromDateTextBox"
                                                ControlToValidate="ToDateTextBox" ErrorMessage="From Date &gt; To Date" 
                                                Operator="GreaterThan" Type="Date"
                                                CssClass="validation-msg" ForeColor="Red"></asp:CompareValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td style="text-align: left">
                                        <asp:Button ID="FilterButton" runat="server" CssClass="form-filter" 
                                            TabIndex="12" onclick="FilterButton_Click" />
                                    </td>
                                    <td colspan="2"></td>
                                </tr>
                                <tr>
                                    <td colspan="4" align="center">
                                        <rsweb:ReportViewer ID="TimesheetDocReportViewer" runat="server" Width="9in" 
                                            Font-Names="Verdana" Font-Size="8pt" InteractiveDeviceInfos="(Collection)" 
                                            WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" 
                                            Height="14.69in">
                                            <LocalReport ReportPath="Reporting\TimesheetReportDoc.rdlc">
                                                <DataSources>
                                                    <rsweb:ReportDataSource DataSourceId="odsTimesheetDoc" Name="DataSet1" />
                                                </DataSources>
                                            </LocalReport>
                                        </rsweb:ReportViewer>
                                        <asp:ObjectDataSource ID="odsTimesheetDoc" runat="server" 
                                            OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" 
                                            TypeName="Presentation.TimesheetReportDocTableAdapters.TimesheetStatusTableAdapter">
                                            <SelectParameters>
                                                <asp:Parameter DefaultValue="Approved" Name="Statusname" Type="String" />
                                                <asp:ControlParameter ControlID="UsernameTextBox" DefaultValue="doantt3" 
                                                    Name="Username" PropertyName="Text" Type="String" />
                                                <asp:ControlParameter ControlID="FromDateTextBox" DefaultValue="1/1/2000" 
                                                    Name="FromDate" PropertyName="Text" Type="DateTime" />
                                                <asp:ControlParameter ControlID="ToDateTextBox" DefaultValue="1/1/2015" 
                                                    Name="ToDate" PropertyName="Text" Type="DateTime" />
                                            </SelectParameters>
                                        </asp:ObjectDataSource>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
                <div class="clear">
                </div>
            </div>
            <!--  end content-table-inner  -->
        </td>
        <td id="tbl-border-right">
        </td>
    </tr>
</table>
<div class="clear">
    &nbsp;</div>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Footer" runat="server">
</asp:Content>
